﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using HotelManagement.Common;
using HotelManagement.BL;

namespace HotelManagement.PL
{
    public partial class GoodWarnForm : Form
    {
        public GoodWarnForm()
        {
            InitializeComponent();
        }

        private void GoodWarnForm_Load(object sender, EventArgs e)
        {
            UpdateGridView();
        }

        private void UpdateGridView()
        {
            int nResult;
            try
            {
                Goods goods = new Goods();
                GoodsBL searchBL = new GoodsBL();
                nResult = searchBL.SearchWarnGoods(ref goods);

                if (goods.GoodsCollection != null)
                {
                    dgvGoods.AutoGenerateColumns = false;
                    dgvGoods.DataSource = goods.GoodsCollection;
                }
            }
            catch
            {

            }
        }
    }
}
